//
//  ComposeTitleView.swift
//  WBTest
//
//  Created by 张海峰 on 2017/8/1.
//  Copyright © 2017年 张海峰. All rights reserved.
//

import UIKit
import SnapKit
class ComposeTitleView: UIView {
    //懒加载
     lazy var titlelabel : UILabel = UILabel()
     lazy var screenNameLabel : UILabel = UILabel()
    
    //构造函数
    override init(frame: CGRect){
        super.init(frame: frame)
        setupUI()
    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) hasnot been imple")
    }
}
extension ComposeTitleView{
   func setupUI(){
    addSubview(titlelabel)
    addSubview(screenNameLabel)
     // 设计Frame
    titlelabel.snp.makeConstraints { (make) in
        make.centerX.equalTo(self)
        make.top.equalTo(self)
    }
    screenNameLabel.snp.makeConstraints { (make) in
        make.centerX.equalTo(titlelabel.snp.centerX)
        make.top.equalTo(titlelabel.snp.bottom).offset(3)
    }
    //设置空间的属性
    titlelabel.font = UIFont.systemFont(ofSize: 16)
    screenNameLabel.font = UIFont.systemFont(ofSize: 14)
    screenNameLabel.textColor = UIColor.lightGray
     //设置文字内容
    titlelabel.text = "发微博"
    screenNameLabel.text = "需要的内容"
    }
   
}
